<!DOCTYPE html>
<html>
<head>
	<title>js_19</title>
</head>
<body>
	<p>什么是DOM（Document Object Model）</p>
	<p>答：它是中立于平台和语言的接口，它允许程序或脚本动态的访问、更新文档内容、结构和样式</p>
	<p>HTML DOM</p>
	<p>答：是关于如何获取、更改、添加或删除 HTML 元素的标准</p>
	<p id="demo">改变我</p>



	 <div id="wrapper">
        <div id="news-top" class="section">
            <h3>Some title</h3>
            <div class="content">
                <ul>
                    <li><span>HTML</span><a href="">Some Link1</a></li>
                    <li><span>JS</span><a class="active" href="">Some Link2</a></li>
                    <li><span>CSS</span><a href="">Some Link3</a></li>
                    <li><span>JS</span><a href="">Some Link4</a></li>
                </ul>
            </div>
            <img src="">
            <p class="">Some Text</p>
        </div>
        <div id="news-normal" class="section">
            <h3>Some title</h3>
            <div class="content">
                <ul>
                    <li><span>HTML</span><a href="">Some Link1</a></li>
                    <li><span>HTML</span><a href="">Some Link2</a></li>
                    <li><span>JS</span><a class="active" href="#">Some Link3</a></li>
                    <li><span>CSS</span><a href="">Some Link4</a></li>
                </ul>
            </div>
            <li>asd</li>
            <img src="">
            <p class="">Some Text</p>
        </div>      
    </div>



	<script type="text/javascript">
		var demo = document.getElementById("demo");
			demo.innerHTML = '变了吧';
			demo.attribute = 'cls';



	function getAllListItem() {
        // 返回页面中所有li标签
        var lis = document.getElementsByTagName("li");
        console.log(lis)
    }getAllListItem();

    function findAllHtmlSpanInOneSection(sectionId) {
        // 返回某个section下所有span中内容为HTML的span标签
        
    }findAllHtmlSpanInOneSection('HTML')
    function findListItem(sectionId, spanCont) {
        // 返回某个section下，所有所包含span内容为spanCont的LI标签
        


    }findListItem('','JS')

    function getActiveLinkContent(sectionId) {
        // 返回某个section下，class为active的链接中包含的文字内容
    }

	</script>
</body>
</html>